Skip to content

Conversation

@Flechaa
Copy link
Contributor

@Flechaa Flechaa commented Jan 2, 2025

Previously in PR #48, all JSON releated crashes were supposed to be fixed, however I completely missed out that typeof doesn't catch things like null in JSON since they are considered an object in JavaScript.

Also arrays are not used for messages in Rotom so those were also checked and dropped in this PR.

Snippet that replicates the crash:

const WebSocket = require("ws");

const ws = new WebSocket("ws://localhost:7070/control", {
    headers: {
        "x-rotom-secret": ""
    }
});

ws.on("open", () => {
    ws.send("null");
});

@Fabio1988 Fabio1988 requested a review from na-ji January 30, 2025 08:31
@na-ji na-ji merged commit 274ab3c into UnownHash:main Mar 24, 2025
2 of 5 checks passed
@na-ji
Copy link
Contributor

na-ji commented Mar 24, 2025

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants